home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Tools - Objects / Virtual User 1.0 / Example Scripts / MouseChaos.vu < prev    next >
Text File  |  1991-01-25  |  835b  |  35 lines

  1. #
  2. #    File:        MouseChaos.vu
  3. #
  4. #    Contains:    A very simple VU script that illustrates the use of the system tasks  
  5. #                random(), and mouseSpeed().  Simply run it against any target machine.
  6. #
  7. #    Conventions:    Global variables begin with a capital letter
  8. #
  9. #    Written by:    Jay Jessen
  10. #
  11. #    Copyright:    © 1990 by Apple Computer, Inc., all rights reserved.
  12. #
  13. #    Change History:
  14. #
  15. #        5/17/90        JAS        Create globals Number_of_moves and Max_mouse_speed.  A few small
  16. #                            changes in comment header.
  17. #        
  18. #        11/7/89           Jay        creation
  19. #
  20. #    To Do:
  21. #
  22.  
  23. Number_of_moves := 20;
  24. Max_mouse_speed := 20;
  25.  
  26. match[screen m:true r:?Screen_rect]!;
  27. X_hi := Screen_rect[3];
  28. Y_hi := Screen_rect[4];
  29. for i := 1 to Number_of_moves begin
  30.     mouseSpeed(random(0,Max_mouse_speed));
  31.     x := random(,X_hi);
  32.     y := random(,Y_hi);
  33.     println '(',X,',',Y,')';
  34.     move absolute: { X,Y };
  35. end;